#include<iostream>
#include<cstring>
#include<vector>
using namespace std;

#define MAX 20

int G[MAX][MAX];
int n,m;
int maxVex = 0;
bool added[MAX];
vector<int> vexs;

void Init()
{
  memset(G,0,MAX*MAX*sizeof(int));
  cout<<"请输入图的点数与边数n、m:";
  cin>>n>>m;
  cout<<"请输入"<<m<<"条边"<<endl;
  for(int i=0;i<m;i++)
  {
    int a,b;
    cin>>a>>b;
    G[a][b]=1,G[b][a]=1;
  }
}

void f()
{
  bool max = true;
  for(int i=1;i<=n;i++)
  {
    if(!added[i])
    {
      bool flag = true;
      if(vexs.size()!=0)
      {
        for(int j=0;j<vexs.size();j++)
        {
          if(vexs[j]!=i && G[vexs[j]][i]==0)
          {
            flag = false;
            break;
          }
        }
      }

      if(flag)
      {
        added[i]=true;
        vexs.push_back(i);
        f();
        added[i]=false;
        vexs.pop_back();
        max = false;
      }
    }
  }
  if(max)
    maxVex = (maxVex>vexs.size())? maxVex:vexs.size();
}

int main()
{
  memset(added,false,MAX);
  Init();
  f();
  cout<<maxVex<<endl;
}
